1.63

 

题目

a. Let A be an infinite regular language. Prove that A can be split into two infinite disjoint regular subsets.

b. Let B and D be two languages. Write BD if BD and D contains infinitely many strings that are not in B. Show that if B and D are two regular languages where BD, then we can find a regular language C where BCD.


思路

点击展开

a. 正则语言的无限性可以看作来自 DFA 的回路,通过规定通过回路的方式,可以将无限性分为多份

b. 在第一问的铺垫下,思路显然


解答

点击展开

a. 为了将正则语言分为 m 个无穷的部分,我们记字符串经过 DFA 中状态的总次数记为 k,并将 (kmodm) 作为标记,添加接受字符串的额外条件:(kmodm)=i,就构成了 m 个新的 DFA,形式化的构造显然,不赘述。由于经过回路的次数是任意的,所以这些新的 DFA 都对应无穷的正则语言。

b.DBa 划分为 2 个无穷正则子集